QuickTime stores most of its data using specialized structures in memory, called atoms. Movies themselves are atoms, as are tracks, media, and data samples. There are two kinds of atoms: chunk atoms, which your code accesses by offsets, and QT atoms, for which QuickTime provides a full set of access tools.
Each atom carries its own size and type information as well as its data. A container atom is an atom that contains other atoms, including other container atoms. There are several advantages to using QT atoms for holding and passing information:
QT atoms can nest indefinitely, forming hierarchies that are easy to pass from one process to another.
QuickTime provides a single set of tools by which you can search and manipulate QT atoms of all types.
Each atom has a four-character type designation that describes its internal structure. For example, movie atoms are type 'moov' , while the track atoms inside them are type 'trak' .
Atoms that contain only data, and not other atoms, are called leaf atoms. A leaf atom simply contains a series of data fields accessible by offsets. You can use QuickTime's atom tools to search through QT atom hierarchies until you get to leaf atoms, then read the leaf atom's data from its various fields. With chunk atoms, you read their size bytes and access their contents by calculating offsets. For more information about atoms and atom containers, see Inside Macintosh: QuickTime.
Figure 1-14 shows an example of the atom structure of a simple QuickTime movie that has one track containing video data. Both the atoms in Figure 1-14 are chunk atoms, so you create and read them through your own code.
Figure 14 Atom structure of a simple QuickTime movie
| Previous | Chapter Contents | Chapter Top |